﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Clanci.aspx.cs" Inherits="Clanci" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="Stilovi/clanci.css" rel="stylesheet" type="text/css" />
    <link href="Stilovi/stranicenje.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <div id="clanciSadrzaj">

   

    <asp:SqlDataSource ID="sdsClanci" runat="server" 
        ConnectionString="<%$ ConnectionStrings:EnciklopedijaDrvecaConnectionString %>" SelectCommand="SELECT clanak.* FROM clanak INNER JOIN poglavlje ON clanak.poglavljeid=poglavlje.poglavljeid
WHERE poglavlje.nazivpoglavlja LIKE @kategorija">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="%" Name="kategorija" 
                QueryStringField="kategorija" />
        </SelectParameters>
    </asp:SqlDataSource>
    <p id="naslovTablica"><%= Naslov() %></p>
     <asp:GridView ID="grdClanci" runat="server" AutoGenerateColumns="False" 
         DataKeyNames="ClanakID" DataSourceID="sdsClanci" CellSpacing="20" 
         PageSize="6" CssClass="clanciGrid" AllowPaging="True">
         <Columns>
             <asp:BoundField DataField="ClanakID" HeaderText="ClanakID" 
                 InsertVisible="False" ReadOnly="True" SortExpression="ClanakID" 
                 Visible="False" />
             <asp:BoundField DataField="NazivClanka" HeaderText="NazivClanka" 
                 SortExpression="NazivClanka" Visible="False" />
             <asp:BoundField DataField="TextClanka" HeaderText="TextClanka" 
                 SortExpression="TextClanka" Visible="False" />
             <asp:BoundField DataField="DatumPisanja" HeaderText="DatumPisanja" 
                 SortExpression="DatumPisanja" Visible="False" />
             <asp:BoundField DataField="PoglavljeID" HeaderText="PoglavljeID" 
                 SortExpression="PoglavljeID" Visible="False" />
             <asp:BoundField DataField="GalerijaID" HeaderText="GalerijaID" 
                 SortExpression="GalerijaID" Visible="False" />
             <asp:TemplateField ShowHeader="false">
                 <ItemTemplate>
                        <%# Skrati(Eval("ClanakID").ToString()) %>
                    </ItemTemplate>
                    <ItemStyle Wrap="True" />
             </asp:TemplateField>
         </Columns>
        
         <PagerSettings Mode="NumericFirstLast" PageButtonCount="8" />
         <PagerStyle CssClass="stranicenje" />
        
     </asp:GridView>

    </div>

</asp:Content>

